<select id="sl_categories" name="sl_categories" onchange="loadMatchingCategories()">
							<option value="">
                    		--Select Category--
                    		</option>                    	
                    		<?php 
                    		foreach($categories as $category){
                    			?>
                    		<option value="<?php echo $category->getId()?>">
                    			<?php echo $category->getName()?>
                    		</option>	
                    		<?php 
                    			}
                    		?>
</select>		


<script>
	$('form').jqTransform({imgPath:'../images/forms'});

	function loadMatchingCategories(){

		var php_url = '<?php echo url_for('copy_contents/getMatchingCategories?category_id=')?>';
		var category_id = document.getElementById('sl_categories').value;
		php_url = php_url.concat(category_id);	

		if (category_id != ""){
			$.ajax({type: 'POST', url:php_url, script:true, cache:false, 
				success: function(data) { 
					 $('#empty_categories').html(data);
					} });
		}else{
			$('#empty_categories').html("");
		}
		
	}	
	
</script>